//
//  LCTabBarViewController.m
//  TianXiaShi
//
//  Created by qianfeng01 on 15-7-11.
//  Copyright (c) 2015年 CongCong. All rights reserved.
//

#import "LCTabBarViewController.h"
#import "WMPageController.h"
#import "LCRecommendViewController.h"
#import "LCLiveViewController.h"
#import "LCProgromViewController.h"
#import "LCDocumentViewController.h"
#import "LCMineViewController.h"
#import "LCFirstRCViewController.h"
#import "LCJunShiViewController.h"
#import "LCYuLeViewController.h"
#import "LCYuanChuangViewController.h"
#import "LCSheHuiViewController.h"
#import "LCGaoXiaoViewController.h"
#import "LCLianBoTianViewController.h"
#import "LCLiShiViewController.h"

@interface LCTabBarViewController ()

@end

@implementation LCTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSMutableArray *classArr = [NSMutableArray array];
    NSArray *titles = @[@"精选",@"军事",@"娱乐",@"社会",@"搞笑",@"原创",@"历史",@"联播台"];
    Class first = [LCFirstRCViewController class];
    Class junShi = [LCJunShiViewController class];
    Class yuLe = [LCYuLeViewController class];
    Class sheHui = [LCSheHuiViewController class];
    Class gaoXiao = [LCGaoXiaoViewController class];
    Class yuanChuang = [LCYuanChuangViewController class];
    Class liShi = [LCLiShiViewController class];
    Class lianBoTiai = [LCLianBoTianViewController class];
    [classArr addObjectsFromArray:@[first,junShi,yuLe,sheHui,gaoXiao,yuanChuang,liShi,lianBoTiai]];
    WMPageController *page = [[WMPageController alloc]initWithViewControllerClasses:classArr andTheirTitles:titles];
    page.menuItemWidth = 80;
    page.menuHeight = 40;
    page.titleSizeSelected = 20;
    page.pageAnimatable = YES;
    page.menuViewStyle = WMMenuViewStyleLine;

    UINavigationController *recommendNavi = [[UINavigationController alloc]initWithRootViewController:page];
    page.title = @"推荐";
    LCLiveViewController *live = [[LCLiveViewController alloc]init];
    live.title = @"直播";
    UINavigationController *liveNavi = [[UINavigationController alloc]initWithRootViewController:live];
    LCProgromViewController *program = [[LCProgromViewController alloc]init];
    program.title = @"节目";
    UINavigationController *pgNavi = [[UINavigationController alloc]initWithRootViewController:program];
    LCDocumentViewController *document = [[LCDocumentViewController alloc]init];
    document.title = @"纪录片";
    UINavigationController *dcNavi = [[UINavigationController alloc]initWithRootViewController:document];
    LCMineViewController *mine = [[LCMineViewController alloc]init];
    mine.title = @"我的";
    UINavigationController *mineNavi = [[UINavigationController alloc]initWithRootViewController:mine];
    self.viewControllers = @[recommendNavi,liveNavi,pgNavi,dcNavi,mineNavi];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
